$.handleDatePickersWithIcon = function(inputId, format) {
    if (jQuery().datepicker) {
        $.fn.datepicker.defaults.format = format;
        $("#" + inputId + " input").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: format,
            autoclose: true,
            todayHighlight:true
        });
        $("#" + inputId + " .input-group-addon").click(function() {
            $("#" + inputId + " input").datepicker("show");
        });
    }
};
function validateForm(classNameRoot, classNameInput) {
    if ($('.' + classNameRoot)) {
        $('.' + classNameRoot + ' .' + classNameInput).each(function() {
            val = $(this).val();
            if ($(this).val() === "")
                $(this).addClass('ui-err');
            else
                $(this).removeClass('ui-err');
        });
    }
}

var changelanguage_Click = function(lgid)
{
    var str = window.location.toString();

    window.location = "/changelanguage.html?id=" + lgid + "&url=" + str;

};

var ChiTietTinNhan_Click = function(idtin)
{
    cmdChiTietTinNhan([{name: 'ID', value: '' + idtin + ''}]);
};